<link href="__CDN__/static/libs/layui/css/layui.css" rel="stylesheet">
<link href="__CDN__/static/libs/layui/modules/step-lay/step.css" rel="stylesheet">
<style>
	.layui-form-item .layui-form-label {
		width: 100px;
	}
	.layui-upload-drag{
		width: 560px;
		height: 200px;
		margin: 0 auto;
		padding-top: 60px;
	}
</style>
<div class="layui-fluid">
	<div class="layui-card">
		<div class="layui-card-body" style="padding-top: 40px;">
			<div class="layui-carousel" id="stepForm" lay-filter="stepForm" style="margin: 0 auto;">
				<div carousel-item>
					<div>
						<form class="layui-form" role="form" style="margin: 0 auto;max-width: 560px;padding-top: 40px;">
							<div class="layui-form-item">
								<label class="layui-form-label">匹配条件:</label>
								<div class="layui-input-block">
								 <input type="checkbox" name="row[is_search_name]" value="1" disabled title="项目名称" {in name="info.is_search_name|default=1" value="1"}checked{/in}>
								 <input type="checkbox" name="row[is_search_code]" value="1" disabled title="项目编号" {in name="info.is_search_code|default=1" value="1"}checked{/in}>
								 <input type="checkbox" name="row[is_search_unit]" value="1" title="计量单位" {in name="info.is_search_unit|default=1" value="1"}checked{/in}>
								 <input type="checkbox" name="row[is_search_description]" value="1" title="项目特征" {in name="info.is_search_description|default=1" value="1"}checked{/in}>
								</div>
								<div class="layui-input-block layui-form-mid layui-word-aux">
									项目名称及项目编号默认必须匹配
								</div>
							</div>
							
							<div class="layui-form-item">
								<label class="layui-form-label">选择项目:</label>
								<div class="layui-input-inline">
									<input id="c-search_projectids" data-source="project/index"
										data-multiple="true" class="form-control selectpage" data-field="project_name"
										data-search-field="project_name" data-params='{"datalimit":"auth"}'
										data-primary-key="id" name="row[search_projectids]" type="text" value="{$info.search_projectids|default=''}">

								</div>
							</div>
							<div class="layui-form-item hide">
								<label class="layui-form-label">上下浮动比例:</label>
								<div class="layui-input-inline">
									<input id="c-float_ratio" class="form-control" name="row[float_ratio]" step="0.01"
										type="number" value="{$info.float_ratio|default=''}">
								</div>
							</div>

							<div class="layui-form-item">
								<div class="layui-input-block">
									<input type="hidden" name="row[project_id]" id="project_id" value="{$info.id}">
									<button class="layui-btn" lay-submit lay-filter="formStep">
										&emsp;下一步&emsp;
									</button>
								</div>
							</div>
						</form>
					</div>
					<div>
						<form class="layui-form" role="form" style="margin: 0 auto;max-width: 560px;padding-top: 40px;">
							<div class="layui-form-item">
								<div class="layui-upload-drag" id="uploadFile">
									<i class="layui-icon"></i>
									<p>点击上传，或将文件拖拽到此处</p>
								</div>
								<div class="layui-hide" id="uploadDemoView">
									<a target="_blank" data-downloader="" data-downloader-url="" data-downloader-title=""></a>
									<!-- <div class="layui-progress layui-progress-big" lay-showpercent="true" lay-filter="demo">
										<div class="layui-progress-bar layui-bg-red" lay-percent="0%"></div>
									</div> -->
								</div>
								<div class="layui-form-mid layui-word-aux">
									支持10MB以内的xls 或者 xlsx 格式文件<br>
									项目编号 读取标题为“{:implode('”或“',$excelTitleMapping.code)}” 列数据<br>
									项目名称 读取标题为“{:implode('”或“',$excelTitleMapping.name)}” 列数据<br>
									项目特征 读取标题为“{:implode('”或“',$excelTitleMapping.description)}” 列数据<br>
									单位 读取标题为“{:implode('”或“',$excelTitleMapping.unit)}” 列数据<br>
								</div>
							</div>
							<div class="layui-form-item">
								<div class="layui-input-block">
									<button type="button" class="layui-btn layui-btn-primary pre">上一步</button>
									<button class="layui-btn" lay-submit lay-filter="formStep2">
										&emsp;下一步&emsp;
									</button>
								</div>
							</div>
						</form>
					</div>
					<div style="overflow: auto;">
						<table class="table table-bordered table-hover">
							<thead>
								<tr>
									<th width="100">序号</th>
									<th width="100">项目编码</th>
									<th width="150">项目名称</th>
									<th>项目特征描述</th>
									<th width="100">计量单位</th>
									<th width="100">工程量</th>
									<th width="100">综合单价(元)</th>
									<!-- <th width="100">合价(元)</th> -->
									<!-- <th width="100">暂估价(元)</th> -->
								</tr>
							</thead>
							<tbody id="tablebody">
								
							</tbody>
						</table>
						<div style="text-align: center;margin-top: 50px; position: fixed;top: 600px;right: 100px;">
							<button class="layui-btn" lay-submit lay-filter="formStep3">导入</button>
							<button class="layui-btn layui-btn-primary pre" >上一步</button>
						</div>
					</div>
				</div>
			</div>
			
		</div>
	</div>
</div>
<script type="text/html" id="listtpl">
	<% if (items.length > 0){ %>
		<% for (var i = 0; i < items.length; i++) { %>
			<tr>
				<td><%=(i+1)%></td>
				<td><%=items[i].code%></td>
				<td><%=items[i].name%></td>
				<td><%=items[i].description%></td>
				<td><%=items[i].unit%></td>
				<td><%=items[i].quantity%></td>
				<td><%=items[i].unit_price%></td>
				<!-- <td><%=items[i].total_price%></td> -->
				<!-- <td><%=items[i].appraise_price%></td> -->
			</tr>
		<% } %>
	<% } %>
</script>